package com.ywk.effective;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.TreeSet;

/**
 * Copyright (C) 2023 思创数码科技股份有限公司
 * <p/>
 * 版权所有
 * <p/>
 * 类名　　  : CompareTest
 * 功能概要  :
 *
 * @Author : yangwk
 * @Date : 2024/2/26 20:19
 */
public class CompareTest {
    public static void main(String[] args) {
        TreeSet<Double> treeSet = new TreeSet<>();
        HashSet<Double> set = new HashSet<>();
        Double aDouble = new Double(1.0);
        Double aDouble2 = new Double(1);
        Double aDouble1 = new Double(1.00);
        System.out.println(aDouble2);
        System.out.println(aDouble.equals(aDouble1));
        treeSet.add(new Double(1.0));
        treeSet.add(new Double(1.00));
        System.out.println(treeSet);
        set.add(new Double(1.0));
        set.add(new Double(1.00));
        System.out.println(new BigDecimal(1.00).toString());
        System.out.println(set.toString());
    }
}
